<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateSysFormFilterGroups extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('sys_form_filter_groups', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('form_id')->default(0)->comment('表单id');
            $table->string('title', 64)->default('')->comment('筛选标题');
            $table->boolean('can_edit')->default(1)->comment('是否可编辑');
            $table->boolean('is_system')->default(0)->comment('是否是系统预设');
            $table->integer('uid')->default(0)->comment('用户id');
            $table->integer('order')->default(1)->comment('排序 升序');
            $table->boolean('is_delete')->default(0);
            $table->tinyInteger('action_type')->default(1);
            $table->bigInteger('created_at')->default(0);
            $table->bigInteger('updated_at')->default(0);
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('sys_form_filter_groups');
    }
}
